<?php
	$ui = $this->load->library('Ui');
?>
	<h2>Recent Activity</h2>

	<?php 
		//Create a table.
		$table = '<table cellspacing="1" cellpadding="5" width="100%">
				<tr class="head"><th width="100px">Username</th><th>Module</th><th>Action</th></tr>';
		foreach($recent as $key => $value){ 
			$table .= '<tr><td width="100px">'. 
						$value['username'] .
						'</td><td>'.
						ucfirst($value['module']) .
						'</td><td>'. 
						$value['action'] .
						'</td></tr>';
		}
		$table .= '</table>';
	?>
	<?php
		//Generate Dialog Box
		echo $ui->makeDialog( "Recent Activity ".$ui->makeOption(anchor('administration/dashboard/delete','Clear Log'),1) , $table, 'maximize center' );
	?>
